%!TeX program=xelatex
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{gzgnote}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexart}}
\ProcessOptions\relax
\LoadClass[UTF8,fontset=none,scheme=chinese]{ctexart}


%%==================标题格式==================%%
%\usepackage{needspace}
\ctexset{
    contentsname=\centerline {目\ 录},
    abstractname=摘\quad 要,
%    secnumdepth=2,
%    tocdepth=2,
    part={
        tocline=\CTEXifname{\thepart\enspace}{}#2,
        %		aftername=\par\vskip -1.5em~\\,
        format+=\color{cored},
%        aftername=\enspace,
    },
    section={
        format=\color{biaoti}\heiti,
        %		number=\chinese{section},
        %				name=\S,
        aftername=\enspace,
        beforeskip=0.25ex,
        afterskip=0.25ex,
    },
    subsection={
        format=\color{biaoti}\kaishu,
        %		number=\arabic{subsection},
        %		name={,.},
        aftername=\enspace,
        beforeskip=0.25ex,
        afterskip=0.25ex,
        tocline=\CTEXifname{\CTEXthesubsection\enspace}{}#2,
    },
    subsubsection={
        format=\color{biaoti} \fangsong,
        %		number=\arabic{subsubsection},
        %		name={(,)},
        aftername=\enspace,
        beforeskip=0.25ex,
        afterskip=0.25ex,
%        tocline=\hspace{-1em}\CTEXifname{\CTEXthesubsubsection\enspace}{}#2,
    },
}

\usepackage{titletoc}
%\dottedcontents{section}[left]{above-code}{label-width}{leader-width}
\dottedcontents{part}[3.5em]{}{3.5em}{0pc}
\dottedcontents{section}[1.5em]{}{1.5em}{0.8pc}
\dottedcontents{subsection}[2.7em]{}{1.5em}{0.8pc}
\titlecontents*{subsubsection}[1.5em]{\small}{}{}{·\thecontentspage}[\quad][]


\RequirePackage{myoptions}
\pagestyle{myfancy}
